<h1>New topic in <%=h @forum.name %></h1>

<div id="sub_nav">
  <%= link_to "&larr; Back to #{@forum.name}", forum_forum_path(@forum) %>
</div>

<%= error_messages_for :topic %>
<%= error_messages_for :post %>
<% remote_form_for( [:forum,@topic]) do |f| -%>
  <%= f.label :title, "Title" %><br/>
  <%= f.text_field :title %>
	<%- f.fields_for :posts do |field| -%>
	<%= field.label :body, "内容"%>
    <%= field.text_area :body ,:rows => 3 , :cols => 20 %>
	<% end -%>
	<div class="row button">
      <%= f.submit "Create", :class => 'button' %>
    </div>
<% end -%>
